<template>
  <router-view />
  <AIChat />
</template>

<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import AIChat from '@/components/AIChat/index.vue'
import { initMcp } from '@/components/AIChat/mcp';
const { endpointTransport, mcpValidator } = initMcp();

if (process.env.NODE_ENV === 'development') {
  endpointTransport.clientIdResolved.then((id) => {
    console.log('Client ID:', id);
  });
}


onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
  })
})
</script>
